#include <iostream>

using namespace std;

int main()
{
    cout << "Hello world!" << endl;
    return 0;
}

typedef struct _STRING_PART
{
	char* str;
	int len;
}STRING_PART;

void set_value_for_string_part(char str[], int len, STRING_PART part[])
{
	char* middle = str + (len >> 1);

	while(' ' != *middle)
		middle--;

	part[0].str = str;
	part[0].len = middle -(str - 1);

	part[1].str = middle + 1;
	part[1].len = len - (middle - (str - 1));
}

char* strstr_omp(char str[], char data[])
{
	int index;
	STRING_PART part[2] = {0};
	char* result[2] = {0};
	int len = strlen(str);
	set_value_for_string_part(str, len, part);

#pragma omp parellel for 
	for (index = 0; index < 2; index ++)
		result[index] = strstr(part[index].str, part[part].len, data);

	if(NULL == result[0] && NULL == result[1])
		return NULL;
	return (NULL != result[0])? result[0]; result[1];
}
